<script type="text/javascript">
    $(function() {
        $("#login").focus();
        $("#login").keypress(function (event) {
            if(event.which == 13) {
                $("#bt_logar").click();
            }
        });
        $("#senha").keypress(function (event) {
            if(event.which == 13) {
                $("#bt_logar").click();
            }
        });
        $("#bt_logar").button().click(function() {
            logar();
        });
    });
</script>
<div style="width: 100%">
    <div id="janela_logar" class="ui-widget-content" align="center">
        <table style="width:380px">
            <tr>
                <td align="left" colspan="2">
                    <div id="erro">
                        &nbsp;
                        <br/>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="left" colspan="2">
                    <font size="2">Usu&aacute;rio:</font>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="text" id="login" style="width:100%"/>
                </td>
            </tr>
            <tr>
                <td align="left" colspan="2">
                    <font size="2">Senha:</font>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="password" id="senha" style="width:100%"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <a href="javascript:showDialogConsultaEmail()">Esqueceu sua senha?</a>
                </td>
                <td align="right">
                    <button id="bt_logar" style="font-size: 12px;">Entrar</button>
                </td>
            </tr>
        </table>
    </div>
</div>